package com.example.demo.controller;

import com.example.demo.bean.User;
import com.example.demo.service.impl.UserServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @RequestMapping("/login")
    public boolean login(@RequestParam ("user") User user)
    {
        UserServiceImpl userService = new UserServiceImpl();
        if(userService.findUserByUser(user) != null)
        return true;
        else
            return false;
    }
}
